 package com.oanda.blackberry.restapi;
 
 import net.rim.device.api.util.Persistable;
 
 public class PricePoint
   implements Persistable
 {
   public long time;
   public float openBid;
   public float openAsk;
   public float closeBid;
   public float closeAsk;
   public float maxBid;
   public float maxAsk;
   public float minBid;
   public float minAsk;
 
   public PricePoint(long time, float openBid, float openAsk, float closeBid, float closeAsk, float maxBid, float maxAsk, float minBid, float minAsk)
   {
     this.time = time;
     this.openBid = openBid;
     this.openAsk = openAsk;
     this.closeBid = closeBid;
     this.closeAsk = closeAsk;
     this.maxBid = maxBid;
     this.maxAsk = maxAsk;
     this.minBid = minBid;
     this.minAsk = minAsk;
   }
 
   public float getOpenPriceAvr() {
     return (this.openAsk + this.openBid) / 2.0F;
   }
 
   public float getClosePriceAvr() {
     return (this.closeAsk + this.closeBid) / 2.0F;
   }
 
   public float getMinPriceAvr() {
     return (this.minAsk + this.minBid) / 2.0F;
   }
 
   public float getMaxPriceAvr() {
     return (this.maxAsk + this.maxBid) / 2.0F;
   }
}

